import request from "../../../../assets/js/request";

/**
 * 搜索公告
 * @param searchData
 * @returns {*}
 */
export function searchData(searchData){
  return request({
    url:"/notice/searchBySearchData",
    method:"POST",
    data:searchData,
    headers:{
      "Content-Type" : "application/json"
    }
  });
}

/**
 * 删除公告
 * @param id
 * @returns {*}
 */
export function deleteNotice(ids){
  return request({
    url:"/notice/deleteNotice",
    method:"POST",
    data:ids,
    headers:{
      "Content-Type" : "application/json"
    }
  })
}

/**
 * 修改公告状态
 * @param ids
 * @param type
 * @returns {*}
 */
export function updateStatus(ids,type){
  const data = {
    ids: ids,
    type : type
  }
  return request({
    url:"/notice/updateStatus",
    method:"post",
    data: data,
    headers:{
      "Content-Type" : "application/json"
    }
  })
}
